from vehicle import Vehicle

class Car(Vehicle):
    pass

class Bus(Vehicle):   #公交类（载重量，最高速）
    maxspeed = 120
    def info(self):   #输出车辆信息
        print(f"bus Brand: {self.brand}")
        print(f"bus PlateNumber: {self.number} ")
        print(f"bus Color: {self.color}")
        print(f"bus route_number: {self.route_number}")
        print(f"bus route_list: {self.route_list}")
        return

    def __init__(self,vinfo,route_number,route_list):   #初始化车辆信息
        super().__init__(vinfo)
        self.route_number = route_number
        self.route_list = route_list
        self.speed = 0
        return  

    def boardcast(self):
        if(self.speed != 0):
            print(f"下一站是{self.route_list[2]}")


    #def set_route(self,route_list):





def main():
    bus1_info = {"brand":"Audi","number":"粤B12345","color":"White"}
    bus1 = Bus(bus1_info,"B667",["A站","B站","C站","D站"])
    bus1.speed = 0
    bus1.info()
    bus1.boardcast()


if __name__ == "__main__":
    main()
